package com.yunfei.bo;
import com.yunfei.core.utils.string.StringUtil;
import com.yunfei.entity.UserLikeLogEntity;

/**
 *@tablename USER_LIKE_LOG
 *@author zhengyunfei
 *@createDate Fri Nov 02 16:08:38 CST 2018
 */


public class UserLikeLogBo implements java.io.Serializable{
 private String browMdl;
 private String userId;
 private String userName;
 private String operFlg;
 private String operDate;
 private String likeDtlId;
 private String field;
 private String order;

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    /**
     * 更改排序字段
     * @return
     */
public String getField() {
        return field;
}
public void setField(String field) {
        this.field = field;
}
public String getOrder() {
        return order;
}
public void setOrder(String order) {
        this.order = order;
}
 private int curNo;
 public int getCurNo() {
     int value=(curNo-1)*curSize;
     return value;
 }
 public void setCurNo(int curNo) {
     this.curNo = curNo;
 }
 private int curSize;
 public int getCurSize() {
     return curSize;
 }
 public void setCurSize(int curSize) {
     this.curSize = curSize;
 }
 public void setBrowMdl(String browMdl){
     this.browMdl=browMdl;
 }
 public String getBrowMdl(){
     return browMdl;
 }
 public void setUserId(String userId){
     this.userId=userId;
 }
 public String getUserId(){
     return userId;
 }
 public void setOperFlg(String operFlg){
     this.operFlg=operFlg;
 }
 public String getOperFlg(){
     return operFlg;
 }
 public void setOperDate(String operDate){
     this.operDate=operDate;
 }
 public String getOperDate(){
     return operDate;
 }
 public void setLikeDtlId(String likeDtlId){
     this.likeDtlId=likeDtlId;
 }
 public String getLikeDtlId(){
     return likeDtlId;
 }
 public static UserLikeLogEntity boToEntity(UserLikeLogBo bo){
     UserLikeLogEntity entity=new UserLikeLogEntity();
     entity.setBrowMdl(bo.getBrowMdl());
     entity.setUserId(bo.getUserId());
     entity.setOperFlg(bo.getOperFlg());
     entity.setOperDate(bo.getOperDate());
     entity.setLikeDtlId(bo.getLikeDtlId());
     return entity;
 }
 public static UserLikeLogBo entityToBo(UserLikeLogEntity bo){
     UserLikeLogBo entity=new UserLikeLogBo();
     entity.setBrowMdl(bo.getBrowMdl());
     entity.setUserId(bo.getUserId());
     entity.setOperFlg(bo.getOperFlg());
     entity.setOperDate(bo.getOperDate());
     entity.setLikeDtlId(bo.getLikeDtlId());
     return entity;
 }
 public static String changeFieldColumn(String field){
     String result="";
         if(!StringUtil.isNullOrEmpty(field)){
             if(field.equals("browMdl")){
                 result="BROW_MDL";
             }
             if(field.equals("userId")){
                 result="USER_ID";
             }
             if(field.equals("operFlg")){
                 result="OPER_FLG";
             }
             if(field.equals("operDate")){
                 result="OPER_DATE";
             }
             if(field.equals("likeDtlId")){
                 result="LIKE_DTL_ID";
             }
     }
     return result;
 }
}

